Function.prototype.myApply = function () {
  let _this = arguments[0]
  const _thisType = typeof _this
  if (_thisType === 'string') {
    _this = new String(_this)
  } else if (_thisType === 'number') {
    _this = new Number(_this)
  } else if (_thisType === 'boolean') {
    _this = new Boolean(_this)
  }
  let params = [...arguments].slice(1)
  let args = Array.isArray(params) ? params : []
  const invokeFn = this
  if (_this === null || _this === undefined) {
    invokeFn(...args)
  }
  let invokeFnName = Symbol(_this)
  _this[invokeFnName] = invokeFn
  return _this[invokeFnName](...args)
}